<?php

namespace yak\layui\actions;

use yii\web\ErrorAction;

/**
 * Class YakErrorAction
 * @package yak\libs
 */
class YakErrorAction extends ErrorAction
{
    /**
     * @var
     */
    public $renderHtmlLayout;

    /**
     * @return string
     */
    public function renderHtmlResponse()
    {
        if ($this->renderHtmlLayout instanceof \Closure) {
            $this->controller->layout = call_user_func($this->renderHtmlLayout);
        }

        return parent::renderHtmlResponse(); // TODO: Change the autogenerated stub
    }
}
